package tests;
import maths.Vector3d;
public class vectorTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Vector3d v1 = new Vector3d(1,2,3);
		double[] p2 = new double[] {4,5,6};
		Vector3d v2 = new Vector3d(p2);
		
		System.out.println(v1.toString());
		System.out.println(v2.toString());
		
		Vector3d add = new Vector3d();
		add.add(v2);
		System.out.println("0+v2 " + add.toString());
		
		Vector3d sub = new Vector3d();
		sub.sub(v2);
		System.out.println("0-v2 " + sub.toString());
		
		Vector3d mult = new Vector3d();
		mult = v2;
		mult.multiply(2);
		System.out.println("2*v2 " + mult.toString());
		
		double dot = v1.dot(v2);
		System.out.println("v1.v2 = " + dot);
		
		Vector3d cross = new Vector3d();
		cross.cross(v1, v2);
		System.out.println("v1xv2 = " + cross.toString());
		
		double length = v1.length();
		double lengthSquared = v1.lengthSquared();
		
		System.out.println("l= " + length + " l^2 = " + lengthSquared);

		double angle = v1.angle(v2);
		System.out.println("angle = " + angle);
		
		Vector3d norm = new Vector3d();
		norm.normalize(v1);
		
		System.out.println("norm v1 = " + norm.toString());
		
		v1.normalize();
		
		System.out.println("norm v1 = " + v1.toString());


	}

}
